Add support for chip variants and new ESP32P4 #333
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for handling chip variants in the build system, making it possible to distinguish between different configurations of the same target (e.g.,
esp32p4vs.esp32p4_es). The changes update scripts and configuration files to consistently use the newCHIP_VARIANTvariable, ensuring builds, outputs, and configurations are correctly associated with the intended variant.Build System Updates:
build.shandtools/config.shto extract and usechip_variantfromconfigs/builds.json, defaulting totargetif not specified. All build and config operations now referenceCHIP_VARIANTinstead of justIDF_TARGET. [1] [2] [3]CMakeLists.txtto passCHIP_VARIANTto scripts, ensuring the correct variant is used during library, bootloader, and memory variant copying. [1] [2] [3]Configuration File Changes:
esp32p4_esinconfigs/builds.json, enabling builds for this chip variant with its own features, libraries, bootloaders, and memory variants.configs/defconfig.esp32p4_esfor the new variant with specific configuration options, including ESP-Hosted-MCU, Bluetooth, display, and USB settings.Script and Variable Renaming:
tools/copy-libs.sh,tools/copy-bootloader.sh,tools/copy-mem-variant.sh) to acceptCHIP_VARIANTas an argument and use it in output paths and logging, replacing previous uses ofIDF_TARGET. [1] [2] [3]tools/config.shto useCHIP_VARIANTfor SDK paths and platform definitions.Logging and Output Improvements:
targetandCHIP_VARIANT, improving clarity during multi-variant builds. [1] [2] [3] [4]Default Configuration Handling:
CHIP_VARIANTis not set, it defaults to the value ofIDF_TARGET, maintaining backward compatibility.These changes collectively enable robust multi-variant support in the build system, making it easier to manage and build different configurations for the same hardware target.
Connected to espressif/arduino-esp32#12036